package org.ecshop.models;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

@NamedQueries({
	@NamedQuery(name = "goodsSearchTips", query = "from GoodsName as gn where gn.goodsName like ?"),
	@NamedQuery(name = "goodsSearchTipsCount", query = "select count(gn) from GoodsName as gn where gn.goodsName like '%N%'")
})
/**
 * Goods entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "ecs_goods")
public class GoodsName implements java.io.Serializable {

	// Fields

	private Integer goodsId;
	private String goodsName;

	// Constructors

	/** default constructor */
	public GoodsName() {
	}

	/** minimal constructor */
	public GoodsName(String goodsName) {
	}


	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "goods_id", unique = true, nullable = false)
	public Integer getGoodsId() {
		return this.goodsId;
	}

	public void setGoodsId(Integer goodsId) {
		this.goodsId = goodsId;
	}

	@Column(name = "goods_name", nullable = false, length = 120)
	public String getGoodsName() {
		return this.goodsName;
	}

	public void setGoodsName(String goodsName) {
		this.goodsName = goodsName;
	}

}